package com.jiuyou.clientController.mall.product;

import com.jiuyou.clientController.base.ClientBaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.shopping.domain.MallComment;
import com.ruoyi.shopping.service.IMallCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chengliang
 * @Date: Created in 2022/6/21
 */
@RestController
@RequestMapping("/client/mall/product/comment")
public class MallProductCommentClientController extends ClientBaseController {
    @Autowired
    private IMallCommentService commentService;
    @PostMapping
    public TableDataInfo getList(Long productId){
        MallComment mallComment = new MallComment();
        mallComment.setProductId(productId);
        startPage();
        return getDataTable(commentService.selectMallCommentList(mallComment));
    }
}
